<?php
/**
 * 用户类
 *
 */

namespace dragon\User;

use think\Model;
use think\Request;
use dragon\Exceptions\UserException;

class ThirdPartyUser extends Model
{

    // 依赖注入
    public static function invoke(Request $request)
    {
        $id = $request->param('id');
        return User::get($id);
    }

    // 关联主表
    public function user()
    {
        return $this->belongsTo('User');
    }



}
